package starblaze
{
	
  public final class Attribute 
  {
    
    public static const LIFE      :Attribute = new Attribute("life"     , Type.FLOAT);
    public static const LIFE_INIT :Attribute = new Attribute("lifeInit" , Type.FLOAT);
    
    public static const POS_X     :Attribute = new Attribute("posX"     , Type.FLOAT);
    public static const POS_Y     :Attribute = new Attribute("posY"     , Type.FLOAT);
    public static const POS_Z     :Attribute = new Attribute("poxZ"     , Type.FLOAT);
    public static const ROT       :Attribute = new Attribute("rot  "    , Type.FLOAT);
    public static const ROT_X     :Attribute = new Attribute("rotX"     , Type.FLOAT);
    public static const ROT_Y     :Attribute = new Attribute("rotY"     , Type.FLOAT);
    public static const ROT_Z     :Attribute = new Attribute("rotZ"     , Type.FLOAT);
    public static const ROT_W     :Attribute = new Attribute("rotY"     , Type.FLOAT);
    
    public static const VEL_X     :Attribute = new Attribute("velX"     , Type.FLOAT);
    public static const VEL_Y     :Attribute = new Attribute("velY"     , Type.FLOAT);
    public static const VEL_Z     :Attribute = new Attribute("velZ"     , Type.FLOAT);
    public static const VEL_W     :Attribute = new Attribute("velW"     , Type.FLOAT);
    public static const VEL_W_X   :Attribute = new Attribute("velWX"    , Type.FLOAT);
    public static const VEL_W_Y   :Attribute = new Attribute("velWY"    , Type.FLOAT);
    public static const VEL_W_Z   :Attribute = new Attribute("velWZ"    , Type.FLOAT);
    public static const VEL_W_W   :Attribute = new Attribute("velWW"    , Type.FLOAT);
    
    public static const ALPHA     :Attribute = new Attribute("alpha"    , Type.FLOAT);
    public static const ALPHA_INIT:Attribute = new Attribute("alphaInit", Type.FLOAT);
    
    public static const SCALE     :Attribute = new Attribute("scale"    , Type.FLOAT);
    public static const SCALE_INIT:Attribute = new Attribute("scaleInit", Type.FLOAT);
    
    public static const COLOR     :Attribute = new Attribute("color"    , Type.INT  );
    
    public function get name():String { return m_name; }
    public function get type():Type { return m_type; }
    public function get numBytes():uint { return m_type.numBytes; }
    
    public function Attribute(name:String, type:Type) 
    {
      m_name = name;
      m_type = type;
    }
    
    public function equals(rhs:Attribute):Boolean
    {
      return m_name == rhs.m_name && m_type.equals(rhs.m_type);
    }
    
    private var m_name:String;
    private var m_type:Type;
    
  }

}
